<?php
/**
 * Interface for factory classes
 *
 * Copyright (C) 2008  Sean Hickey
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @author Sean Hickey <sean@headzoo.com>
 * @version $Id: Interface.php 388 2008-07-03 05:36:50Z sean $
 * @package Alinks_Factory
 */
interface Alinks_Factory_Interface
{
	/**
	 * Returns the name of the factory
	 *
	 * @return string
	 */
	function getName();
	
	/**
	 * Returns the safe name for the factory
	 *
	 * @return string
	 */
	function getSafeName();
	
	/**
	 * Returns the URL for the factory
	 *
	 * @return string
	 */
	function getUrl();
	
	/**
	 * Returns a short description of the factory
	 *
	 * @return string
	 */
	function getDescription();
	
	/**
	 * Returns information about the creators of the factory
	 *
	 * The return value should be an array of arrays. Each of the inner
	 * arrays should contain a 'name' index with the author's name, and
	 * a 'url' index, with the author's website URL.
	 *
	 * @return array
	 */
	function getAuthors();
	
	/**
	 * Returns the factory version
	 *
	 * @return float
	 */
	function getVersion();
	
	/**
	 * Returns which version of aLinks this factory is compatible with
	 *
	 * Returns a string that represents which versions of aLinks this factory
	 * can run under. The string can be a single version number like '1.0', which
	 * means the factory works only with aLinks 1.0, or it can contain a wildcard
	 * character like '1.*', which means it works with any version of aLinks in the
	 * 1.x branch.
	 *
	 * @return string
	 */
	function getAlinksVersion();
	
	/**
	 * Sets the factory settings
	 *
	 * @param array $settings The settings
	 * @return Alinks_Factory_Interface
	 */
	function setSettings(array $settings);
	
	/**
	 * Returns the factory settings
	 *
	 * @return array
	 */
	function getSettings();
	
	/**
	 * Returns if the factory has a settings form
	 *
	 * @return bool
	 */
	function hasSettingsForm();
	
	/**
	 * Returns if the factory has a keyphrases form
	 *
	 * @return bool
	 */
	function hasKeyphrasesForm();
	
	/**
	 * Returns the form information for the settings page
	 *
	 * @var array
	 */
	function getSettingsForm();
	
	/**
	 * Returns the form information for the keyphrases page
	 *
	 * @var array
	 */
	function getKeyphrasesForm();
	
	/**
	 * Returns HTML to display on the Help page
	 *
	 * @return string
	 */
	function getHelp();
}